<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>水平导航栏(浮动版)</title>
    <link rel="stylesheet" href="../css/reset.css" />
    <style>
      ul li {
        float: left;
      }

      ul li a {
        float: left;
        padding: 10px 20px;
        color: #fff;
        background-color: #ccc;
      }

      ul li a:hover {
        background-color: #2b2b2b;
      }
    </style>
  </head>
  <body>
    <ul class="topbar">
      <li><a href="#">选项1</a></li>
      <li><a href="#">选项2</a></li>
      <li><a href="#">选项3</a></li>
      <li><a href="#">选项4</a></li>
      <li><a href="#">选项5</a></li>
    </ul>
  </body>
</html>
